package com.xiaoyu.izf.model.exception;

/**
 * 状态码和错误信息
 */

public enum BusinessStatusEnum {

    //成功
    OK(200,"ok"),
    //错误
    ERROR(500,"%s"),
    //不存在
    NOT_EXIST(404,"not exist：%s"),
    //未登录
    NOT_LOGIN(600,"请登录"),
    NO_PERMISSION(400,"无权限")
    ;

    private int status;
    private String message;

    BusinessStatusEnum(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public int status() {
        return this.status;
    }

    public String message() {
        return this.message;
    }
}